/* ****************************************************************************
 *
 * Copyright (c) Microsoft Corporation. 
 *
 * This source code is subject to terms and conditions of the Microsoft Public License. A 
 * copy of the license can be found in the License.html file at the root of this distribution. If 
 * you cannot locate the  Microsoft Public License, please send an email to 
 * dlr@microsoft.com. By using this source code in any fashion, you are agreeing to be bound 
 * by the terms of the Microsoft Public License.
 *
 * You must not remove this notice, or any other, from this software.
 *
 *
 * ***************************************************************************/

using Microsoft.Scripting.Ast;

namespace Microsoft.Scripting.Ast {
    partial class LambdaCompiler {

        private delegate void Emitter(LambdaCompiler lc, Expression expression);

        private static readonly Emitter[] _Emitters = new Emitter[] {
            #region Generated Expression Compiler

            // *** BEGIN GENERATED CODE ***
            // generated by function: gen_compiler from: generate_tree.py

            EmitBinaryExpression,                                       //    Add
            EmitBinaryExpression,                                       //    AddChecked
            EmitBinaryExpression,                                       //    And
            EmitAndAlsoBinaryExpression,                                //    AndAlso
            EmitUnaryExpression,                                        //    ArrayLength
            EmitBinaryExpression,                                       //    ArrayIndex
            EmitMethodCallExpression,                                   //    Call
            EmitBinaryExpression,                                       //    Coalesce
            EmitConditionalExpression,                                  //    Conditional
            EmitConstantExpression,                                     //    Constant
            EmitUnaryExpression,                                        //    Convert
            EmitUnaryExpression,                                        //    ConvertChecked
            EmitBinaryExpression,                                       //    Divide
            EmitBinaryExpression,                                       //    Equal
            EmitBinaryExpression,                                       //    ExclusiveOr
            EmitBinaryExpression,                                       //    GreaterThan
            EmitBinaryExpression,                                       //    GreaterThanOrEqual
            EmitInvocationExpression,                                   //    Invoke
            EmitLambdaExpression,                                       //    Lambda
            EmitBinaryExpression,                                       //    LeftShift
            EmitBinaryExpression,                                       //    LessThan
            EmitBinaryExpression,                                       //    LessThanOrEqual
                                                                        // ** ListInit
            EmitMemberExpression,                                       //    MemberAccess
                                                                        // ** MemberInit
            EmitBinaryExpression,                                       //    Modulo
            EmitBinaryExpression,                                       //    Multiply
            EmitBinaryExpression,                                       //    MultiplyChecked
            EmitUnaryExpression,                                        //    Negate
            EmitUnaryExpression,                                        //    UnaryPlus
            EmitUnaryExpression,                                        //    NegateChecked
            EmitNewExpression,                                          //    New
            EmitNewArrayExpression,                                     //    NewArrayInit
            EmitNewArrayExpression,                                     //    NewArrayBounds
            EmitUnaryExpression,                                        //    Not
            EmitBinaryExpression,                                       //    NotEqual
            EmitBinaryExpression,                                       //    Or
            EmitOrElseBinaryExpression,                                 //    OrElse
            EmitParameterExpression,                                    //    Parameter
            EmitBinaryExpression,                                       //    Power
            EmitUnaryExpression,                                        //    Quote
            EmitBinaryExpression,                                       //    RightShift
            EmitBinaryExpression,                                       //    Subtract
            EmitBinaryExpression,                                       //    SubtractChecked
            EmitUnaryExpression,                                        //    TypeAs
            EmitTypeBinaryExpression,                                   //    TypeIs
            EmitActionExpression,                                       //    ActionExpression
            EmitAssignmentExpression,                                   //    Assign
            EmitBlock,                                                  //    Block
            EmitBreakStatement,                                         //    BreakStatement
            EmitLambdaExpression,                                       //    Generator
            EmitContinueStatement,                                      //    ContinueStatement
            EmitDeleteExpression,                                       //    Delete
            EmitDoStatement,                                            //    DoStatement
            EmitEmptyStatement,                                         //    EmptyStatement
            EmitLabeledStatement,                                       //    LabeledStatement
            EmitLocalScopeExpression,                                   //    LocalScope
            EmitLoopStatement,                                          //    LoopStatement
            EmitUnaryExpression,                                        //    OnesComplement
            EmitReturnStatement,                                        //    ReturnStatement
            EmitScopeExpression,                                        //    Scope
            EmitSwitchStatement,                                        //    SwitchStatement
            EmitThrowStatement,                                         //    ThrowStatement
            EmitTryStatement,                                           //    TryStatement
            EmitVariableExpression,                                     //    Variable
            EmitYieldStatement,                                         //    YieldStatement
            EmitExtensionExpression,                                    //    Extension

            // *** END GENERATED CODE ***

            #endregion
        };
    }
}
